from django.db import models
from  utils.modelsMixin import ModelSetMixin
from  django.contrib.auth.models import User
# Create your models here.
class Classes(ModelSetMixin):
    name = models.CharField('班级名称', max_length=20, help_text='班级名称')
    num = models.CharField('班期', max_length=20,help_text='班期')
    member = models.ManyToManyField(User)  # 关联字段，

    class Meta:
        db_table = 'classes'
        verbose_name = '班级'
        verbose_name_plural = verbose_name

    def __str__(self):
        return f'{self.name}-{self.num}'